package top.xiaoshuaila.util;

import org.springframework.security.core.context.SecurityContextHolder;
import top.xiaoshuaila.pojo.Admin;

public class AdminUtils {
    public static Admin getCurrentAdmin(){
        return ((Admin) SecurityContextHolder.getContext().getAuthentication().getPrincipal());
    }
}
